
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>快速入门 · GISBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="kongchao">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-page-toc-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-insert-logo/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-donate/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../styles/website.css">
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="reference.html" />
    
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="http://www.richfit.com/" target="_blank" class="custom-link">官网网站</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        <li class="header">1.简介</li>
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                        <b>1.1.</b>
                    
                    简介
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">2.GIS基础知识</li>
        
        
    
        <li class="chapter " data-level="2.1" >
            
                <a target="_blank" href="http://www.baidu.com">
            
                    
                        <b>2.1.</b>
                    
                    GIS基础知识
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">3.ArcGIS平台介绍</li>
        
        
    
        <li class="chapter " data-level="3.1" >
            
                <span>
            
                    
                        <b>3.1.</b>
                    
                    ArcGIS Enterprise 介绍
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="3.2" >
            
                <span>
            
                    
                        <b>3.2.</b>
                    
                    ArcGIS Enterprise 环境搭建
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="3.3" >
            
                <span>
            
                    
                        <b>3.3.</b>
                    
                    ArcGIS Geodatabase 与企业级地理数据库
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="3.4" >
            
                <span>
            
                    
                        <b>3.4.</b>
                    
                    三维模型数据标准与处理
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="3.5" >
            
                <span>
            
                    
                        <b>3.5.</b>
                    
                    发布服务
            
                </span>
            

            
        </li>
    

    
        
        <li class="header">4.二维GIS组件</li>
        
        
    
        <li class="chapter " data-level="4.1" >
            
                <span>
            
                    
                        <b>4.1.</b>
                    
                    组件参考手册
            
                </span>
            

            
        </li>
    

    
        
        <li class="header">5.三维GIS组件</li>
        
        
    
        <li class="chapter " data-level="5.1" data-path="../3d/quickstart.html">
            
                <a href="../3d/quickstart.html">
            
                    
                        <b>5.1.</b>
                    
                    快速入门
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="../3d/reference.html">
            
                <a href="../3d/reference.html">
            
                    
                        <b>5.2.</b>
                    
                    参考手册
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.3" >
            
                <span>
            
                    
                        <b>5.3.</b>
                    
                    代码示例
            
                </span>
            

            
        </li>
    

    
        
        <li class="header">6.Android组件</li>
        
        
    
        <li class="chapter active" data-level="6.1" data-path="quickstart.html">
            
                <a href="quickstart.html">
            
                    
                        <b>6.1.</b>
                    
                    快速入门
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="reference.html">
            
                <a href="reference.html">
            
                    
                        <b>6.2.</b>
                    
                    参考手册
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.3" >
            
                <span>
            
                    
                        <b>6.3.</b>
                    
                    代码示例
            
                </span>
            

            
        </li>
    

    
        
        <li class="header">7.相关标准规范</li>
        
        
    
        <li class="chapter " data-level="7.1" >
            
                <span>
            
                    
                        <b>7.1.</b>
                    
                    java开发规范
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="7.2" >
            
                <span>
            
                    
                        <b>7.2.</b>
                    
                    android开发规范
            
                </span>
            

            
        </li>
    

    
        
        <li class="header">8.参考资料</li>
        
        
    
        <li class="chapter " data-level="8.1" >
            
                <a target="_blank" href="https://developers.arcgis.com/javascript/">
            
                    
                        <b>8.1.</b>
                    
                    ArcGIS API for JavaScript 4.+
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="8.2" >
            
                <a target="_blank" href="https://developers.arcgis.com/javascript/3/">
            
                    
                        <b>8.2.</b>
                    
                    ArcGIS API for JavaScript 3.+
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="8.3" >
            
                <a target="_blank" href="https://developers.arcgis.com/android/latest/">
            
                    
                        <b>8.3.</b>
                    
                    ArcGIS Runtime SDK for Android
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >快速入门</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="android-gis&#x7EC4;&#x4EF6;&#x4F7F;&#x7528;&#x8BF4;&#x660E;">Android GIS&#x7EC4;&#x4EF6;&#x4F7F;&#x7528;&#x8BF4;&#x660E;</h1>
<p>[TOC]</p>
<h1 id="1-&#x7B80;&#x4ECB;">1. &#x7B80;&#x4ECB;</h1>
<p>&#x57FA;&#x4E8E;ArcGIS runtime for android 100.8.0 &#x5C01;&#x88C5;&#x7684;&#x901A;&#x7528;&#x7684;Android&#x79FB;&#x52A8;&#x7AEF;&#x7684;&#x5730;&#x56FE;&#x7EC4;&#x4EF6;(&#x4EE5;&#x4E0B;&#x7B80;&#x79F0;rfmap)&#xFF0C;&#x89E3;&#x51B3;&#x79FB;&#x52A8;&#x7AEF;&#x5730;&#x56FE;&#x901A;&#x7528;&#x529F;&#x80FD;&#x548C;&#x5E38;&#x7528;&#x4E1A;&#x52A1;&#x529F;&#x80FD;&#x7684;&#x590D;&#x7528;&#x95EE;&#x9898;&#xFF0C;&#x51CF;&#x5C11;&#x91CD;&#x590D;&#x5F00;&#x53D1;&#x5DE5;&#x4F5C;&#x91CF;&#xFF0C;&#x51CF;&#x8F7B;&#x79FB;&#x52A8;&#x7AEF;&#x5730;&#x56FE;&#x5E94;&#x7528;&#x5F00;&#x53D1;&#x7684;&#x96BE;&#x5EA6;&#x3002;</p>
<p>&#x901A;&#x8FC7;&#x672C;&#x6587;&#x7684;&#x4ECB;&#x7ECD;&#xFF0C;&#x4F60;&#x5C06;&#x4E86;&#x89E3;&#x7EC4;&#x4EF6;&#x600E;&#x4E48;&#x83B7;&#x53D6;&#x3001;&#x5730;&#x56FE;&#x5E03;&#x5C40;&#x600E;&#x4E48;&#x5199;&#x3001;&#x63A5;&#x53E3;&#x5982;&#x4F55;&#x8C03;&#x7528;&#x3002;</p>
<p>rfmap&#x76EE;&#x524D;&#x5305;&#x542B;&#x5E38;&#x89C1;&#x7684;&#x5730;&#x56FE;&#x5DE5;&#x5177;&#x548C;&#x64CD;&#x4F5C;&#x63A5;&#x53E3;&#xFF0C;&#x5982;&#xFF1A;&#x7F29;&#x653E;&#x3001;&#x5B9A;&#x4F4D;&#x3001;&#x5E95;&#x56FE;&#x5207;&#x6362;&#x3001;&#x4E1A;&#x52A1;&#x56FE;&#x5C42;&#x63A7;&#x5236;&#x3001;&#x5F53;&#x524D;&#x624B;&#x673A;&#x56FE;&#x6807;&#x6837;&#x5F0F;&#x4FEE;&#x6539;&#x7B49;&#x3002;rfmap&#x5B9A;&#x4E49;&#x4E86;&#x5DE5;&#x5177;&#x680F;&#x548C;&#x62BD;&#x5C49;&#x4E24;&#x79CD;&#x98CE;&#x683C;&#x754C;&#x9762;&#xFF0C;&#x5E95;&#x56FE;&#x76EE;&#x524D;&#x53EA;&#x80FD;&#x8C03;&#x7528;&#x5728;&#x7EBF;&#x7684;&#x5929;&#x5730;&#x56FE;&#x5F71;&#x50CF;&#x3001;&#x77E2;&#x91CF;&#x548C;&#x5730;&#x5F62;&#x56FE;&#xFF0C;&#x4E1A;&#x52A1;&#x56FE;&#x5C42;&#x914D;&#x7F6E;&#x7684;&#x8C03;&#x7528;&#x7684;&#x5E73;&#x53F0;gw-gis&#x76F8;&#x5173;&#x670D;&#x52A1;&#x63A5;&#x53E3;&#x3002;</p>
<p>&#x793A;&#x4F8B;&#x5982;&#x4E0B;&#x56FE;&#xFF1A;</p>
<p><img src="assets/20200708121749.jpg" alt="20200708121749"></p>
<h2 id="11-&#x57FA;&#x672C;&#x4FE1;&#x606F;">1.1 &#x57FA;&#x672C;&#x4FE1;&#x606F;</h2>
<p>groupId&#xFF1A;com.zhgw</p>
<p>artifactId&#xFF1A;gw-android-arcgis</p>
<p>version: 1.0.0-RELEASE</p>
<p>type:aar</p>
<p>Android sdk&#x7248;&#x672C;&#xFF1A;29</p>
<p>Android sdk&#x6700;&#x5C0F;&#x7248;&#x672C;&#xFF1A;21</p>
<p>Java&#x547D;&#x540D;&#x53CA;&#x7F16;&#x7A0B;&#x89C4;&#x8303;&#xFF1A;<a href="http://note.youdao.com/noteshare?id=c2b7015fdb644e2554bc1947a9593234&amp;sub=778BFA0DA8384FDB8AF8E8F6A392B9F9" target="_blank">&#x300A;&#x963F;&#x91CC;&#x5DF4;&#x5DF4;Java&#x5F00;&#x53D1;&#x624B;&#x518C;&#x300B;</a></p>
<p>Android&#x547D;&#x540D;&#x53CA;&#x7F16;&#x7A0B;&#x89C4;&#x8303;&#xFF1A;<a href="http://note.youdao.com/noteshare?id=4435b03f7bb32adf5208fc53abdcd068&amp;sub=B14339A3FDFE4D93BA3239A423CB366D" target="_blank">&#x300A;&#x963F;&#x91CC;&#x5DF4;&#x5DF4;Android&#x5F00;&#x53D1;&#x624B;&#x518C;&#x300B;</a></p>
<h2 id="12-&#x7EF4;&#x62A4;&#x548C;&#x66F4;&#x65B0;">1.2 &#x7EF4;&#x62A4;&#x548C;&#x66F4;&#x65B0;</h2>
<h3 id="121-&#x7248;&#x672C;&#x66F4;&#x65B0;&#x539F;&#x5219;">1.2.1 &#x7248;&#x672C;&#x66F4;&#x65B0;&#x539F;&#x5219;</h3>
<p>&#x539F;&#x5219;&#x4E0A;&#x7EC4;&#x4EF6;&#x7248;&#x672C;&#x53F7;&#x6709;&#x201C;&#x5927;&#x7248;&#x672C;&#x53F7;-&#x4E2D;&#x7248;&#x672C;&#x53F7;-&#x5C0F;&#x7248;&#x672C;-&#x53D1;&#x5E03;&#x7248;&#x672C;&#x540E;&#x7F00;RELEASE&#x201D;&#x7EC4;&#x6210; &#xFF0C;&#x4E00;&#x822C;&#x7684;bug&#x4FEE;&#x6539;&#x66F4;&#x65B0;&#x5C0F;&#x7248;&#x672C;&#x53F7;&#xFF0C;&#x529F;&#x80FD;&#x8865;&#x5145;&#x4FEE;&#x6539;&#x4E2D;&#x7248;&#x672C;&#x53F7;&#xFF0C;&#x5927;&#x7684;&#x6539;&#x52A8;&#x5347;&#x7EA7;&#x4FEE;&#x6539;&#x5927;&#x7248;&#x672C;&#x53F7;&#x3002;</p>
<h3 id="122-bug&#x53CD;&#x9988;">1.2.2 bug&#x53CD;&#x9988;</h3>
<p>&#x5982;&#x6709;bug&#x95EE;&#x9898;&#xFF0C;&#x8BF7;&#x5C06;&#x5F02;&#x5E38;&#x7684;&#x8BE6;&#x7EC6;&#x4FE1;&#x606F;&#xFF08;&#x622A;&#x56FE;&#x6216;txt&#x6587;&#x672C;&#xFF09;&#x3001;&#x4F20;&#x53C2;&#x3001;android sdk&#x7248;&#x672C;&#x3001;&#x673A;&#x578B;&#x3001;&#x7F51;&#x7EDC;&#x73AF;&#x5883;&#x7B49;&#x4FE1;&#x606F;&#x6574;&#x7406;&#x540E;&#x53D1;&#x9001;&#x90AE;&#x4EF6;&#x81F3;kongchao01@cnpc.com.cn</p>
<h3 id="123-&#x65B0;&#x9700;&#x6C42;">1.2.3 &#x65B0;&#x9700;&#x6C42;</h3>
<p>&#x5982;&#x679C;&#x6709;&#x65B0;&#x9700;&#x6C42;&#xFF0C;&#x8BF7;&#x5148;&#x5C06;&#x9700;&#x6C42;&#x6574;&#x7406;&#x6210;&#x6587;&#x6863;&#xFF0C;&#x53D1;&#x9001;&#x90AE;&#x4EF6;&#x81F3;kongchao01@cnpc.com.cn</p>
<h2 id="13-&#x7248;&#x6743;&#x58F0;&#x660E;">1.3 &#x7248;&#x6743;&#x58F0;&#x660E;</h2>
<p>&#x4E2D;&#x6CB9;&#x745E;&#x98DE;&#x667A;&#x6167;&#x7BA1;&#x7F51;&#x4E1A;&#x52A1;&#x90E8;&#x62E5;&#x6709;&#x8BE5;&#x8F6F;&#x4EF6;&#x548C;&#x6587;&#x6863;&#x7684;&#x6240;&#x6709;&#x6743;&#xFF0C;&#x4EC5;&#x4F9B;&#x5B66;&#x4E60;&#x548C;&#x53C2;&#x8003;&#xFF0C;&#x8BF7;&#x52FF;&#x968F;&#x610F;&#x5206;&#x4EAB;&#x6216;&#x7528;&#x4E8E;&#x5176;&#x5B83;&#x5546;&#x4E1A;&#x7528;&#x9014;&#x3002;</p>
<h1 id="2&#x914D;&#x7F6E;&#x548C;&#x4F7F;&#x7528;">2.&#x914D;&#x7F6E;&#x548C;&#x4F7F;&#x7528;</h1>
<h2 id="21-app&#x548C;maven&#x914D;&#x7F6E;">2.1 App&#x548C;Maven&#x914D;&#x7F6E;</h2>
<h3 id="211-http&#x670D;&#x52A1;&#x6839;&#x76EE;&#x5F55;">2.1.1 http&#x670D;&#x52A1;&#x6839;&#x76EE;&#x5F55;</h3>
<p>&#x7531;&#x4E8E;&#x9700;&#x8981;&#x53D1;&#x8D77;&#x7F51;&#x7EDC;&#x8BF7;&#x6C42;&#xFF0C;&#x9700;&#x8981;&#x8BBE;&#x7F6E;&#x670D;&#x52A1;&#x6839;&#x8DEF;&#x5F84;&#x3002;rfmap&#x7684;&#x670D;&#x52A1;&#x6839;&#x8DEF;&#x5F84;sys_service_root_path&#x7684;&#x503C;&#x914D;&#x7F6E;&#x5728;&#x8D44;&#x6E90;&#x76EE;&#x5F55;values&#x4E0B;&#xFF0C;app&#x9700;&#x8981;&#x6839;&#x636E;&#x81EA;&#x8EAB;&#x7684;&#x73AF;&#x5883;&#x914D;&#x7F6E;sys_service_root_path&#x9879;&#x8986;&#x76D6;aar&#x5305;&#x7684;&#x540C;&#x540D;&#x914D;&#x7F6E;&#x9879;&#x3002;&#x4F8B;&#x5982;&#xFF0C;&#x53EF;&#x4EE5;&#x5728;app&#x7684;values&#x8D44;&#x6E90;&#x76EE;&#x5F55;&#x4E0B;&#x7684;&#x65B0;&#x5EFA;app_setting.xml&#xFF0C;&#x5185;&#x5BB9;&#x914D;&#x7F6E;&#x5982;&#x4E0B;&#xFF1A;</p>
<pre><code class="lang-xml"><span class="php"><span class="hljs-meta">&lt;?</span>xml version=<span class="hljs-string">&quot;1.0&quot;</span> encoding=<span class="hljs-string">&quot;utf-8&quot;</span><span class="hljs-meta">?&gt;</span></span>
<span class="hljs-tag">&lt;<span class="hljs-name">resources</span>&gt;</span>
    <span class="hljs-comment">&lt;!--&#x901A;&#x7528;&#x914D;&#x7F6E; start--&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">string</span> <span class="hljs-attr">name</span>=<span class="hljs-string">&quot;sys_service_root_path&quot;</span>&gt;</span>http://11.0.33.206:8210/gwGis/<span class="hljs-tag">&lt;/<span class="hljs-name">string</span>&gt;</span>
    <span class="hljs-comment">&lt;!--&#x901A;&#x7528;&#x914D;&#x7F6E; end--&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">resources</span>&gt;</span>
</code></pre>
<h3 id="212-&#x670D;&#x52A1;token">2.1.2 &#x670D;&#x52A1;token</h3>
<p>&#x7F51;&#x7EDC;&#x8BF7;&#x6C42;&#x9700;&#x8981;token&#x8BA4;&#x8BC1;&#xFF0C;rfmap&#x9ED8;&#x8BA4;&#x4ECE;app&#x5305;&#x8DEF;&#x5F84;&#x4E0B;&#x7684;SharedPreferences&#x83B7;&#x53D6;&#x767B;&#x5F55;&#x4FE1;&#x606F;<a href="http://www.json.cn/" target="_blank">json</a>&#x4E32;&#xFF0C;&#x767B;&#x5F55;&#x4FE1;&#x606F;&#x5FC5;&#x987B;&#x5305;&#x542B;access_token&#x548C;token_type&#x9879;&#x3002;&#x767B;&#x5F55;&#x4FE1;&#x606F;&#x7684;&#x952E;&#x540D;&#x79F0;&#x9ED8;&#x8BA4;&#x4E3A;loginInfo ,app&#x7AEF;&#x83B7;&#x53D6;token&#x540E;&#x9700;&#x8981;&#x5C06;&#x76F8;&#x5173;&#x4FE1;&#x606F;&#x5199;&#x5165;&#x5230;app&#x5305;&#x4E0B;&#x7684;SharedPrefereshapences&#x4E2D;&#x3002;</p>
<p>rfmap&#x83B7;&#x53D6;token&#x7684;&#x793A;&#x4F8B;&#x4EE3;&#x7801;&#x5982;&#x4E0B;&#xFF1A;</p>
<pre><code class="lang-java"><span class="hljs-function"><span class="hljs-keyword">public</span> String <span class="hljs-title">getTokenValue</span><span class="hljs-params">()</span> </span>{
    String loginInfoName = context.getString(R.string.sys_login_info_name) ;
    String json = getSharedPreferenceString(loginInfoName) ;
    Map&lt;String ,Object&gt; map = JsonUtil.toMap(json) ;
    String token = (String) MapUtil.getValue(map,<span class="hljs-string">&quot;access_token&quot;</span>,<span class="hljs-string">&quot;&quot;</span>);
    String tokenType = (String) MapUtil.getValue(map,<span class="hljs-string">&quot;token_type&quot;</span>,<span class="hljs-string">&quot;&quot;</span>);
    <span class="hljs-keyword">return</span> tokenType + <span class="hljs-string">&quot; &quot;</span> + token ;
}
 <span class="hljs-function"><span class="hljs-keyword">public</span> String <span class="hljs-title">getSharedPreferenceString</span><span class="hljs-params">(String key )</span></span>{
        SharedPrefereshapences sharedPreferences = context.getSharedPreferences(context.getPackageName() ,MODE_PRIVATE);
        String json = sharedPreferences.getString(key,<span class="hljs-string">&quot;&quot;</span>) ;
        <span class="hljs-keyword">return</span> json ;
    }
</code></pre>
<p>&#x5728;values&#x8D44;&#x6E90;&#x6587;&#x4EF6;&#x4E2D;&#x914D;&#x7F6E;sys_login_info_name&#x53EF;&#x4FEE;&#x6539;&#x767B;&#x5F55;&#x4FE1;&#x606F;&#x7684;&#x952E;&#x540D;&#x79F0;&#xFF0C;&#x5982;&#x4E0B;&#xFF1A;</p>
<pre><code class="lang-xml"><span class="php"><span class="hljs-meta">&lt;?</span>xml version=<span class="hljs-string">&quot;1.0&quot;</span> encoding=<span class="hljs-string">&quot;utf-8&quot;</span><span class="hljs-meta">?&gt;</span></span>
<span class="hljs-tag">&lt;<span class="hljs-name">resources</span>&gt;</span>
    <span class="hljs-comment">&lt;!--&#x901A;&#x7528;&#x914D;&#x7F6E; start--&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">string</span> <span class="hljs-attr">name</span>=<span class="hljs-string">&quot;sys_service_root_path&quot;</span>&gt;</span>http://11.0.33.206:8210/gwGis/<span class="hljs-tag">&lt;/<span class="hljs-name">string</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">string</span> <span class="hljs-attr">name</span>=<span class="hljs-string">&quot;sys_login_info_name&quot;</span>&gt;</span>loginInfo<span class="hljs-tag">&lt;/<span class="hljs-name">string</span>&gt;</span>
    <span class="hljs-comment">&lt;!--&#x901A;&#x7528;&#x914D;&#x7F6E; end--&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">resources</span>&gt;</span>
</code></pre>
<blockquote>
<p>&#x6CE8;&#x610F;&#xFF1A;&#x5982;&#x679C;&#x670D;&#x52A1;&#x6839;&#x76EE;&#x5F55;&#x548C;token&#x6CA1;&#x6709;&#x914D;&#x7F6E;&#xFF0C;&#x53EF;&#x80FD;&#x4F1A;&#x5BFC;&#x81F4;&#x4E1A;&#x52A1;&#x56FE;&#x5C42;&#x6570;&#x636E;&#x52A0;&#x8F7D;&#x4E0D;&#x4E86;&#xFF0C;&#x5E76;&#x4E0D;&#x5F71;&#x54CD;&#x5E95;&#x56FE;&#x7684;&#x52A0;&#x8F7D;&#x3002;</p>
</blockquote>
<h3 id="213-maven-&#x4E2D;&#x592E;&#x4ED3;&#x5E93;&#x914D;&#x7F6E;">2.1.3 maven &#x4E2D;&#x592E;&#x4ED3;&#x5E93;&#x914D;&#x7F6E;</h3>
<p> &#x914D;&#x7F6E;app &#x7684;build.gradle&#xFF0C;&#x589E;&#x52A0;&#x5F00;&#x53D1;&#x73AF;&#x5883;maven&#x4E2D;&#x592E;&#x4ED3;&#x5E93;</p>
<pre><code class="lang-groovy">allprojects {
    repositories {
        <span class="hljs-comment">//rf maven &#x4E2D;&#x592E;&#x4ED3;&#x5E93;&#xFF0C;&#x901A;&#x5E38;&#x53D1;&#x5E03;&#x7A33;&#x5B9A;&#x7248;&#x672C;&#xFF0C;&#x66F4;&#x65B0;&#x5468;&#x671F;&#x6162;</span>
        maven {
            url <span class="hljs-string">&apos;http://11.0.33.228:8091/repository/maven-releases/&apos;</span>
        }
        <span class="hljs-comment">//rf maven &#x4E2D;&#x592E;&#x4ED3;&#x5E93;&#xFF0C;&#x5F00;&#x53D1;&#x8FC7;&#x7A0B;&#x4E2D;&#x901A;&#x5E38;&#x53D1;&#x5E03;snapshots&#x7248;&#x672C;&#xFF0C;&#x66F4;&#x65B0;&#x5468;&#x671F;&#x5FEB;</span>
        maven {
            url <span class="hljs-string">&apos;http://11.0.33.228:8091/repository/maven-snapshots/&apos;</span>
        }
        maven {
            url <span class="hljs-string">&apos;https://maven.aliyun.com/repository/public&apos;</span>
        }
        google()
        jcenter()
    }
}
</code></pre>
<h3 id="214-maven-&#x5F15;&#x5165;rfmap">2.1.4 maven &#x5F15;&#x5165;rfmap</h3>
<p>app&#x6216;module &#x4F9D;&#x8D56;&#x5F15;&#x5165;&#x7684;&#x7EC4;&#x4EF6;</p>
<pre><code class="lang-groovy">implementation <span class="hljs-string">&apos;com.zhgw:gw-android-arcgis:1.0.1-RELEASE&apos;</span>
</code></pre>
<p><strong>&#x5F00;&#x53D1;&#x8FC7;&#x7A0B;&#x4E2D;&#xFF0C;&#x7248;&#x672C;&#x66F4;&#x65B0;&#x9891;&#x7E41;&#xFF0C;&#x5EFA;&#x8BAE;&#x5F15;&#x5165;snapshot&#x7248;&#x672C;</strong> </p>
<pre><code class="lang-groovy">implementation <span class="hljs-string">&apos;com.zhgw:gw-android-arcgis:1.0.1-SNAPSHOT&apos;</span>
</code></pre>
<p>&#x6CE8;&#x610F;&#xFF1A;</p>
<p>1.&#x5177;&#x4F53;&#x7684;&#x7EC4;&#x4EF6;&#x7248;&#x672C;&#x53F7;&#x8BF7;&#x8BBF;&#x95EE;&#x4E2D;&#x592E;&#x4ED3;&#x5E93;&#x67E5;&#x770B;&#x548C;&#x4F7F;&#x7528;&#x6700;&#x65B0;&#x7684;&#x7248;&#x672C;&#xFF1B;</p>
<p>2.&#x516C;&#x53F8;&#x5185;&#x7F51;&#x73AF;&#x5883;as&#x9700;&#x8981;&#x8BBE;&#x7F6E;&#x548C;&#x4F7F;&#x7528;&#x4EE3;&#x7406;&#xFF0C;&#x914D;&#x7F6E;&#x53C2;&#x8003;&#x4E0B;&#x56FE;&#xFF1A;</p>
<p><img src="assets/image-20200727181005466.png" alt="image-20200727181005466"></p>
<h2 id="22-&#x7F16;&#x5199;&#x5730;&#x56FE;&#x5E03;&#x5C40;">2.2 &#x7F16;&#x5199;&#x5730;&#x56FE;&#x5E03;&#x5C40;</h2>
<p>&#x5730;&#x56FE;&#x57FA;&#x7840;View&#x7EC4;&#x4EF6;&#x4E3A;RfMapView &#xFF0C;&#x6269;&#x5C55;&#x81EA;<strong>RelativeLayout </strong>&#xFF0C;&#x5305;&#x542B;&#x4E86;ArcGIS Android SDK&#x5B9A;&#x4E49;&#x7684;&#x539F;&#x751F;MapView&#x5BF9;&#x8C61; &#x3002;&#x76EE;&#x524D;&#x5730;&#x56FE;&#x63A7;&#x4EF6;UI&#x6709;&#x4E24;&#x79CD;&#x98CE;&#x683C;&#xFF0C;&#x5DE5;&#x5177;&#x680F;&#x5F0F;&#x548C;&#x62BD;&#x5C49;&#x5F0F;&#x3002;</p>
<h3 id="221-&#x57FA;&#x672C;&#x4F7F;&#x7528;">2.2.1 &#x57FA;&#x672C;&#x4F7F;&#x7528;</h3>
<p>&#x52A0;&#x8F7D;&#x4E00;&#x4E2A;&#x4E0D;&#x5305;&#x542B;&#x63A7;&#x4EF6;&#x7684;&#x5730;&#x56FE;View</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">RelativeLayout</span>
    <span class="hljs-attr">xmlns:android</span>=<span class="hljs-string">&quot;http://schemas.android.com/apk/res/android&quot;</span>
    <span class="hljs-attr">xmlns:ext</span>=<span class="hljs-string">&quot;http://schemas.android.com/apk/res-auto&quot;</span>
    <span class="hljs-attr">android:layout_width</span>=<span class="hljs-string">&quot;match_parent&quot;</span>
    <span class="hljs-attr">android:layout_height</span>=<span class="hljs-string">&quot;match_parent&quot;</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">com.zhgw.android.arcgis.RfMapView</span>
            <span class="hljs-attr">android:id</span>=<span class="hljs-string">&quot;@+id/rfMap&quot;</span>
            <span class="hljs-attr">android:layout_width</span>=<span class="hljs-string">&quot;match_parent&quot;</span>
            <span class="hljs-attr">android:layout_height</span>=<span class="hljs-string">&quot;match_parent&quot;</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">com.zhgw.android.arcgis.RfMapView</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">RelativeLayout</span>&gt;</span>
</code></pre>
<h3 id="221-&#x5DE5;&#x5177;&#x680F;&#x5F0F;&#x5E03;&#x5C40;">2.2.1 &#x5DE5;&#x5177;&#x680F;&#x5F0F;&#x5E03;&#x5C40;</h3>
<p>&#x5DE5;&#x5177;&#x680F;&#x5F0F;&#x5E03;&#x5C40;&#xFF0C;UI&#x63A7;&#x4EF6;&#x4E3B;&#x8981;&#x4EE5;&#x5F39;&#x51FA;&#x7A97;&#x53E3;&#x7684;&#x65B9;&#x5F0F;&#x5C55;&#x73B0;&#x3002;&#x5728;&#x5E03;&#x5C40;&#x6587;&#x4EF6;&#x4E2D;&#x9700;&#x8981;&#x5728;RfMapView&#x91CC;&#x9762;&#x589E;&#x52A0;com.zhgw.android.arcgis.style.toolsbar.ToolsBarControllerView&#xFF0C;&#x793A;&#x4F8B;&#x4EE3;&#x7801;&#x5982;&#x4E0B;&#xFF1A;</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">RelativeLayout</span>
    <span class="hljs-attr">xmlns:android</span>=<span class="hljs-string">&quot;http://schemas.android.com/apk/res/android&quot;</span>
    <span class="hljs-attr">xmlns:ext</span>=<span class="hljs-string">&quot;http://schemas.android.com/apk/res-auto&quot;</span>
    <span class="hljs-attr">android:layout_width</span>=<span class="hljs-string">&quot;match_parent&quot;</span>
    <span class="hljs-attr">android:layout_height</span>=<span class="hljs-string">&quot;match_parent&quot;</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">com.zhgw.android.arcgis.RfMapView</span>
            <span class="hljs-attr">android:id</span>=<span class="hljs-string">&quot;@+id/rfMap&quot;</span>
            <span class="hljs-attr">android:layout_width</span>=<span class="hljs-string">&quot;match_parent&quot;</span>
            <span class="hljs-attr">android:layout_height</span>=<span class="hljs-string">&quot;match_parent&quot;</span>&gt;</span>
            <span class="hljs-comment">&lt;!--&#x5DE5;&#x5177;&#x6761;&#xFF0C;&#x914D;&#x7F6E;&#x81EA;&#x5B9A;&#x4E49;&#x5C5E;&#x6027;&#xFF0C;&#x53EF;&#x4EE5;&#x9690;&#x85CF;&#x4E0D;&#x5FC5;&#x8981;&#x7684;&#x5DE5;&#x5177;&#x6309;&#x94AE;--&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">com.zhgw.android.arcgis.style.toolsbar.ToolsBarControllerView</span>
                    <span class="hljs-attr">android:tag</span>=<span class="hljs-string">&quot;controller&quot;</span>
                    <span class="hljs-attr">ext:rfmap_tb_length_measure_enable</span>=<span class="hljs-string">&quot;false&quot;</span>
                    <span class="hljs-attr">ext:rfmap_tb_area_measure_enable</span>=<span class="hljs-string">&quot;false&quot;</span>
                    <span class="hljs-attr">ext:rfmap_tb_compass_enable</span>=<span class="hljs-string">&quot;false&quot;</span>
                    <span class="hljs-attr">android:layout_marginTop</span>=<span class="hljs-string">&quot;10dp&quot;</span>
                    <span class="hljs-attr">android:layout_marginStart</span>=<span class="hljs-string">&quot;15dp&quot;</span>
                    <span class="hljs-attr">android:orientation</span>=<span class="hljs-string">&quot;vertical&quot;</span>
                    <span class="hljs-attr">android:layout_width</span>=<span class="hljs-string">&quot;wrap_content&quot;</span>
                    <span class="hljs-attr">android:layout_height</span>=<span class="hljs-string">&quot;wrap_content&quot;</span>&gt;</span>
                <span class="hljs-tag">&lt;/<span class="hljs-name">com.zhgw.android.arcgis.style.toolsbar.ToolsBarControllerView</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">com.zhgw.android.arcgis.RfMapView</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">RelativeLayout</span>&gt;</span>
</code></pre>
<p>&#x6548;&#x679C;&#x5982;&#x4E0B;&#x56FE;&#xFF1A;</p>
<p><img src="assets/image-20200723153216046.png" alt="image-20200723153216046"></p>
<p>&#x5982;&#x679C;&#x6709;&#x4E9B;&#x5DE5;&#x5177;&#x6CA1;&#x6709;&#x7528;&#x5230;&#xFF0C;&#x53EF;&#x4EE5;&#x8BBE;&#x7F6E;ToolsBarControllerView&#x7EC4;&#x4EF6;&#x7684;&#x81EA;&#x5B9A;&#x4E49;&#x5C5E;&#x6027;&#x9690;&#x85CF;&#x8D77;&#x6765;&#xFF0C;&#x4F8B;&#x5982;&#xFF1A;</p>
<pre><code class="lang-xml"><span class="php"><span class="hljs-meta">&lt;?</span>xml version=<span class="hljs-string">&quot;1.0&quot;</span> encoding=<span class="hljs-string">&quot;utf-8&quot;</span><span class="hljs-meta">?&gt;</span></span>
<span class="hljs-tag">&lt;<span class="hljs-name">FrameLayout</span> <span class="hljs-attr">xmlns:android</span>=<span class="hljs-string">&quot;http://schemas.android.com/apk/res/android&quot;</span>
    <span class="hljs-attr">xmlns:tools</span>=<span class="hljs-string">&quot;http://schemas.android.com/tools&quot;</span>
    <span class="hljs-attr">xmlns:ext</span>=<span class="hljs-string">&quot;http://schemas.android.com/apk/res-auto&quot;</span>
    <span class="hljs-attr">android:layout_width</span>=<span class="hljs-string">&quot;match_parent&quot;</span>
    <span class="hljs-attr">android:layout_height</span>=<span class="hljs-string">&quot;match_parent&quot;</span>
    <span class="hljs-attr">tools:context</span>=<span class="hljs-string">&quot;.ui.blank.BlankFragment&quot;</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">com.zhgw.android.arcgis.RfMapView</span>
        <span class="hljs-attr">android:id</span>=<span class="hljs-string">&quot;@+id/rfMap&quot;</span>
        <span class="hljs-attr">android:layout_width</span>=<span class="hljs-string">&quot;match_parent&quot;</span>
        <span class="hljs-attr">android:layout_height</span>=<span class="hljs-string">&quot;match_parent&quot;</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">com.zhgw.android.arcgis.style.toolsbar.ToolsBarControllerView</span>
            <span class="hljs-attr">android:tag</span>=<span class="hljs-string">&quot;controller&quot;</span>
            <span class="hljs-attr">ext:rfmap_tb_length_measure_enable</span>=<span class="hljs-string">&quot;false&quot;</span>
            <span class="hljs-attr">ext:rfmap_tb_area_measure_enable</span>=<span class="hljs-string">&quot;false&quot;</span>
            <span class="hljs-attr">ext:rfmap_tb_compass_enable</span>=<span class="hljs-string">&quot;false&quot;</span>
            <span class="hljs-attr">ext:rfmap_tb_layers_enable</span>=<span class="hljs-string">&quot;false&quot;</span>
            <span class="hljs-attr">ext:rfmap_tb_clear_enable</span>=<span class="hljs-string">&quot;false&quot;</span>
            <span class="hljs-attr">android:layout_marginTop</span>=<span class="hljs-string">&quot;10dp&quot;</span>
            <span class="hljs-attr">android:layout_marginStart</span>=<span class="hljs-string">&quot;15dp&quot;</span>
            <span class="hljs-attr">android:orientation</span>=<span class="hljs-string">&quot;vertical&quot;</span>
            <span class="hljs-attr">android:layout_width</span>=<span class="hljs-string">&quot;wrap_content&quot;</span>
            <span class="hljs-attr">android:layout_height</span>=<span class="hljs-string">&quot;wrap_content&quot;</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">com.zhgw.android.arcgis.style.toolsbar.ToolsBarControllerView</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">com.zhgw.android.arcgis.RfMapView</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">FrameLayout</span>&gt;</span>
</code></pre>
<p>&#x6548;&#x679C;&#x5982;&#x56FE;&#xFF1A;</p>
<p><img src="assets/image-20200723163756007.png" alt="image-20200723163756007"></p>
<p><strong>&#x6CE8;&#x610F;&#xFF1A;&#x914D;&#x7F6E;&#x81EA;&#x5B9A;&#x4E49;&#x7EC4;&#x4EF6;&#x5C5E;&#x6027;&#x65F6;&#xFF0C;&#x9700;&#x8981;&#x5F15;&#x5165;<a href="http://schemas.android.com/apk/res-auto" target="_blank">http://schemas.android.com/apk/res-auto</a> &#x8FD9;&#x4E2A;&#x547D;&#x540D;&#x7A7A;&#x95F4;</strong></p>
<h3 id="222-&#x62BD;&#x5C49;&#x5F0F;&#x5E03;&#x5C40;">2.2.2 &#x62BD;&#x5C49;&#x5F0F;&#x5E03;&#x5C40;</h3>
<p>&#x62BD;&#x5C49;&#x5F0F;&#x5E03;&#x5C40; &#xFF0C;UI&#x63A7;&#x4EF6;&#x4E3B;&#x8981;&#x4EE5;<strong>&#x62BD;&#x5C49;&#x9762;&#x677F;</strong>&#x5C55;&#x793A;&#x3002;&#x9700;&#x8981;com.zhgw.android.arcgis.style.drawer.DrawerLayout&#x3001;com.zhgw.android.arcgis.style.drawer.DrawerControllerView&#x3001;com.zhgw.android.arcgis.style.drawer.DrawerContainerView&#x4E09;&#x4E2A;&#x81EA;&#x5B9A;&#x4E49;View&#x7ED3;&#x5408;&#x8D77;&#x6765;&#x4F7F;&#x7528;&#x3002;</p>
<pre><code class="lang-xml"><span class="php"><span class="hljs-meta">&lt;?</span>xml version=<span class="hljs-string">&quot;1.0&quot;</span> encoding=<span class="hljs-string">&quot;utf-8&quot;</span><span class="hljs-meta">?&gt;</span></span>
<span class="hljs-tag">&lt;<span class="hljs-name">com.zhgw.android.arcgis.style.drawer.DrawerLayout</span> <span class="hljs-attr">xmlns:android</span>=<span class="hljs-string">&quot;http://schemas.android.com/apk/res/android&quot;</span>
    <span class="hljs-attr">xmlns:tools</span>=<span class="hljs-string">&quot;http://schemas.android.com/tools&quot;</span>
    <span class="hljs-attr">xmlns:ext</span>=<span class="hljs-string">&quot;http://schemas.android.com/apk/res-auto&quot;</span>
    <span class="hljs-attr">android:layout_width</span>=<span class="hljs-string">&quot;match_parent&quot;</span>
    <span class="hljs-attr">android:layout_height</span>=<span class="hljs-string">&quot;match_parent&quot;</span>
    <span class="hljs-attr">tools:context</span>=<span class="hljs-string">&quot;.ui.manager.ManagerFragment&quot;</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">com.zhgw.android.arcgis.RfMapView</span>
        <span class="hljs-attr">android:id</span>=<span class="hljs-string">&quot;@+id/rfMap&quot;</span>
        <span class="hljs-attr">ext:layers_theme_name</span>=<span class="hljs-string">&quot;Pipeline&quot;</span>
        <span class="hljs-attr">android:layout_width</span>=<span class="hljs-string">&quot;match_parent&quot;</span>
        <span class="hljs-attr">android:layout_height</span>=<span class="hljs-string">&quot;match_parent&quot;</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">com.zhgw.android.arcgis.style.drawer.DrawerControllerView</span>
            <span class="hljs-attr">android:layout_width</span>=<span class="hljs-string">&quot;wrap_content&quot;</span>
            <span class="hljs-attr">android:layout_height</span>=<span class="hljs-string">&quot;wrap_content&quot;</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">com.zhgw.android.arcgis.style.drawer.DrawerControllerView</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">com.zhgw.android.arcgis.RfMapView</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">com.zhgw.android.arcgis.style.drawer.DrawerContainerView</span>
        <span class="hljs-attr">ext:rfmap_id</span>=<span class="hljs-string">&quot;@id/rfMap&quot;</span>
        <span class="hljs-attr">android:background</span>=<span class="hljs-string">&quot;@color/white&quot;</span>
        <span class="hljs-attr">android:layout_gravity</span>=<span class="hljs-string">&quot;end&quot;</span>
        <span class="hljs-attr">android:layout_width</span>=<span class="hljs-string">&quot;match_parent&quot;</span>
        <span class="hljs-attr">android:layout_height</span>=<span class="hljs-string">&quot;match_parent&quot;</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">com.zhgw.android.arcgis.style.drawer.DrawerContainerView</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">com.zhgw.android.arcgis.style.drawer.DrawerLayout</span>&gt;</span>
</code></pre>
<p>&#x6548;&#x679C;&#x5982;&#x4E0B;&#x56FE;&#xFF1A;</p>
<p><img src="assets/20200708121749.jpg" alt="20200708121749"></p>
<p><img src="assets/20200708121803.jpg" alt="20200708121803"></p>
<h1 id="3&#x63A5;&#x53E3;&#x8C03;&#x7528;&#x793A;&#x4F8B;">3.&#x63A5;&#x53E3;&#x8C03;&#x7528;&#x793A;&#x4F8B;</h1>
<p>&#x5730;&#x56FE;&#x5E38;&#x7528;&#x7684;&#x64CD;&#x4F5C;&#x63A5;&#x53E3;&#x5C01;&#x88C5;&#x5728;RfMapView&#x4E2D;&#xFF0C;&#x9996;&#x5148;&#x5148;&#x83B7;&#x53D6;RfMapView&#x5B9E;&#x4F8B;&#x3002;</p>
<pre><code class="lang-java">rfMap = findViewById(R.id.rfMap);
</code></pre>
<p>&#x6240;&#x6709;&#x7684;&#x5730;&#x56FE;&#x64CD;&#x4F5C;&#x63A5;&#x53E3;&#x901A;&#x8FC7;RfMapView&#x5B9E;&#x4F8B;&#x6765;&#x8C03;&#x7528;&#xFF0C;&#x76EE;&#x524D;&#x7684;&#x63A5;&#x53E3;&#x4E3B;&#x8981;&#x662F;<strong>&#x4E8C;&#x7EF4;&#x5730;&#x56FE;</strong>&#x529F;&#x80FD;&#x63A5;&#x53E3;&#x3002;</p>
<h2 id="31-&#x5728;&#x5730;&#x56FE;&#x521B;&#x5EFA;&#x65F6;&#xFF0C;&#x4FEE;&#x6539;&#x5F53;&#x524D;&#x8BBE;&#x5907;&#x7684;&#x56FE;&#x6807;&#x6837;&#x5F0F;">3.1 &#x5728;&#x5730;&#x56FE;&#x521B;&#x5EFA;&#x65F6;&#xFF0C;&#x4FEE;&#x6539;&#x5F53;&#x524D;&#x8BBE;&#x5907;&#x7684;&#x56FE;&#x6807;&#x6837;&#x5F0F;</h2>
<p>&#x5982;&#x679C;&#x5730;&#x56FE;&#x5F53;&#x524D;&#x4F4D;&#x7F6E;&#x9ED8;&#x8BA4;&#x7684;&#x56FE;&#x6807;&#x4E0D;&#x6EE1;&#x8DB3;&#x9700;&#x6C42;&#xFF0C;&#x5728;&#x5730;&#x56FE;&#x521B;&#x5EFA;&#x540E;&#x53EF;&#x4EE5;&#x4FEE;&#x6539;&#x56FE;&#x6807;&#xFF0C;&#x4EE3;&#x7801;&#x793A;&#x4F8B;&#x5982;&#x4E0B;&#xFF1A;</p>
<pre><code class="lang-java"><span class="hljs-comment">//&#x83B7;&#x53D6;&#x56FE;&#x6807;</span>
BitmapDrawable startDrawable = (BitmapDrawable) ContextCompat.getDrawable(<span class="hljs-keyword">this</span>, R.drawable.inspect_man);
<span class="hljs-comment">//&#x8C03;&#x7528;&#x63A5;&#x53E3;&#x521B;&#x5EFA;&#x56FE;&#x6807;&#x6837;&#x5F0F;&#x5BF9;&#x8C61;</span>
PictureMarkerSymbol pictureMarkerSymbol = rfMap.createPictureSymbol(startDrawable , <span class="hljs-number">0</span> ,<span class="hljs-number">20</span>) ;
<span class="hljs-comment">//&#x91CD;&#x8BBE;&#x5F53;&#x524D;&#x4F4D;&#x7F6E;&#x56FE;&#x6807;</span>
rfMap.selfMarkerSymbol(pictureMarkerSymbol);
</code></pre>
<h2 id="32-&#x91C7;&#x96C6;&#x70B9;&#x5750;&#x6807;">3.2 &#x91C7;&#x96C6;&#x70B9;&#x5750;&#x6807;</h2>
<p>&#x91C7;&#x96C6;&#x70B9;&#x5750;&#x6807;&#xFF0C;&#x5B9E;&#x9645;&#x4E0A;&#x662F;&#x5728;&#x5C4F;&#x5E55;&#x4E0A;&#x6807;&#x6CE8;&#x4E00;&#x4E2A;&#x70B9;&#xFF0C;&#x5E76;&#x5C06;&#x70B9;&#x7684;&#x5750;&#x6807;&#x8FD4;&#x56DE;&#xFF0C;&#x4E2D;&#x95F4;&#x63A5;&#x53E3;&#x5C01;&#x88C5;&#x4E86;&#x5C4F;&#x5E55;&#x5750;&#x6807;&#x8F6C;&#x5730;&#x7406;&#x5750;&#x6807;&#x7684;&#x8FC7;&#x7A0B;&#xFF0C;&#x793A;&#x4F8B;&#x4EE3;&#x7801;&#x5982;&#x4E0B;&#xFF1A;</p>
<pre><code class="lang-java"><span class="hljs-comment">//&#x5F00;&#x59CB;&#x91C7;&#x96C6;&#x70B9;&#xFF0C;&#x53EF;&#x901A;&#x8FC7;&#x91CD;&#x8F7D;&#x65B9;&#x6CD5;&#x8BBE;&#x7F6E;&#x70B9;&#x6807;&#x7ED8;&#x6837;&#x5F0F;</span>
rfMap.drawPoint();
<span class="hljs-comment">//&#x8FDB;&#x5165;&#x7F16;&#x8F91;&#x72B6;&#x6001;</span>
<span class="hljs-comment">//...</span>
<span class="hljs-comment">//&#x70B9;&#x51FB;&#x5C4F;&#x5E55;&#x6807;&#x7ED8;&#x70B9;</span>
<span class="hljs-comment">//...</span>
<span class="hljs-comment">//&#x6807;&#x7ED8;&#x7ED3;&#x675F;&#xFF0C;&#x83B7;&#x53D6;&#x6807;&#x7ED8;&#x7684;&#x70B9;&#x5750;&#x6807;</span>
Point targetPoint = (Point)rfMap.latestDrawResult();
<span class="hljs-comment">//&#x4FDD;&#x5B58;...</span>
</code></pre>
<p><strong>&#x6CE8;&#x610F;&#xFF1A;&#x6807;&#x7ED8;&#x63A5;&#x53E3;&#x4E00;&#x822C;&#x5206;&#x4E24;&#x7C7B;&#xFF0C;&#x4E00;&#x79CD;&#x662F;&#x901A;&#x8FC7;&#x624B;&#x52BF;&#x4EA4;&#x4E92;&#x7684;&#x65B9;&#x5F0F;&#x6807;&#x7ED8;&#x56FE;&#x5F62;&#xFF0C;&#x8FD9;&#x7C7B;&#x63A5;&#x53E3;&#x4E00;&#x822C;&#x4EE5;draw&#x5F00;&#x5934;&#xFF1B;&#x7B2C;&#x4E8C;&#x79CD;&#x6807;&#x7ED8;&#x662F;&#x901A;&#x8FC7;&#x6267;&#x884C;&#x4EE3;&#x7801;&#x7684;&#x65B9;&#x5F0F;&#x6DFB;&#x52A0;&#x56FE;&#x5F62;&#xFF0C;&#x8FD9;&#x7C7B;&#x63A5;&#x53E3;&#x901A;&#x5E38;&#x4EE5;add&#x5F00;&#x5934;&#x3002;</strong></p>
<p>&#x66F4;&#x591A;&#x5185;&#x5BB9;&#x8BF7;&#x53C2;&#x8003;<a href="reference.html">&#x300A;Android GIS&#x7EC4;&#x4EF6;&#x53C2;&#x8003;&#x624B;&#x518C;&#x300B;</a></p>
<footer class="page-footer"><span class="copyright">Copyright&#xA9;&#x5317;&#x4EAC;&#x4E2D;&#x6CB9;&#x745E;&#x98DE;&#x4FE1;&#x606F;&#x6280;&#x672F;&#x6709;&#x9650;&#x516C;&#x53F8; &#x667A;&#x6167;&#x5B98;&#x7F51;&#x4E1A;&#x52A1;&#x90E8; all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2020-07-27 18:14:00
</span></footer>
<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                
                <a href="reference.html" class="navigation navigation-next navigation-unique" aria-label="Next page: 参考手册">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"快速入门","level":"6.1","depth":1,"next":{"title":"参考手册","level":"6.2","depth":1,"path":"android/reference.md","ref":"android/reference.md","articles":[]},"previous":{"title":"代码示例","level":"5.3","depth":1,"ref":"","articles":[]},"dir":"ltr"},"config":{"plugins":["hide-element","back-to-top-button","page-toc-button","chapter-fold","code","splitter","-lunr","-search","search-pro","insert-logo","custom-favicon","pageview-count","tbfed-pagefooter","popup","-sharing","sharing-plus","donate","livereload"],"styles":{"website":"styles/website.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright©北京中油瑞飞信息技术有限公司 智慧官网业务部","modify_label":"修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"chapter-fold":{},"livereload":{},"splitter":{},"search-pro":{},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"popup":{},"code":{"copyButtons":true},"donate":{"alipay":"http://doc.zyax.cn/jasgis/image/donate_zfb.jpg","alipayText":"支付宝公众号","button":"关注","title":"请关注以下公众号","wechat":"http://doc.zyax.cn/jasgis/image/donate_wx.jpg","wechatText":"微信公众号"},"hide-element":{"elements":[".gitbook-link"]},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"favicon":"./icon/book.ico","page-toc-button":{"maxTocDepth":2,"minTocSize":2},"back-to-top-button":{},"pageview-count":{},"custom-favicon":{},"sharing":{"pocket":true,"qq":true,"qzone":true,"weibo":true,"all":["douban","facebook","google","instapaper","linkedin","twitter","weibo","messenger","qq","qzone","viber","whatsapp"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":true},"insert-logo":{"style":"max-height:180px;min-height:50px","url":"http://www.richfit.com/static/image/logo.png"}},"theme":"default","author":"kongchao","pdf":{"pageBreaksBefore":"/","headerTemplate":null,"paperSize":"a4","margin":{"right":62,"left":62,"top":36,"bottom":36},"fontSize":12,"fontFamily":"Arial","footerTemplate":null,"chapterMark":"pagebreak","pageNumbers":false},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"GISBook","language":"zh-hans","links":{"sharing":{"all":null,"facebook":null,"google":null,"twitter":null,"weibo":null},"sidebar":{"官网网站":"http://www.richfit.com/"}},"gitbook":"*","description":"GIS参考手册","extension":null},"file":{"path":"android/quickstart.md","mtime":"2020-07-27T10:14:00.736Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-07-28T12:51:14.923Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-hide-element/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-page-toc-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-insert-logo/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing-plus/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-donate/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

